import Vue from 'vue'
import Vuex from 'vuex'
import job from './modules/job'
import user from './modules/user'
import log from './modules/log'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    job,
    user,
    log
  },
  getters: {
    // 全局getters
    token: state => state.user.token,
    userName: state => state.user.userName,
    permissions: state => state.user.permissions
  }
})
